/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jogopoo.Engine;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import sun.audio.AudioPlayer;
import sun.audio.AudioStream;




/**
 *Classe que executa os efeitos de som
 * @author pererabass
 */
public class EngineSom {
    
    public EngineSom(String fileName){
        this.fileName = fileName;   
    }
    public void play(){
                try {
                InputStream in = new FileInputStream(fileName);
                AudioStream as = new AudioStream(in);
                AudioPlayer.player.start(as);

        } catch (IOException e) {
                e.printStackTrace();
        }
    }

    private String fileName;
}
